package com.activemq.controller;

import com.activemq.service.ProducerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yexi
 */
@RestController
public class DemoController {

    @Autowired
    ProducerService producerService;

    @RequestMapping("send")
    public String send() {
        producerService.send("testQueue", "Hello World!");
        return "发送成功";
    }
}
